package cn.jcby.app.lebu.utils;

/**
 * @author Administrator
 */
public class CodeUtils {
    public static String[] HEADER={"MP","SP"} ;
    private final static String BASIC_STR = "00000000000000000" ;
    private static Integer DEFAULT_LEN = 3 ;

    public static String getCodeByLen(String code,Integer len){
        if (code.length()<len){
            code  = BASIC_STR.substring(0,(len-code.length()))+code ;
        }
        return code ;
    }
    public static String getCodeByLen(String code){
        return getCodeByLen(code,DEFAULT_LEN) ;
    }
}
